﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    /// <summary>
    /// Pair for a neural network training.
    /// </summary>
    public class TrainingPair : Pair<double[], double[]>
    {
        public TrainingPair(double[] inputs, double[] outputs)
            : base(inputs, outputs)
        {
        }

        public override string ToString()
        {
            return String.Format("{0}{2}{1}", DoublesToString(First), DoublesToString(Second), Environment.NewLine);
        }

        private String DoublesToString(Double[] doubles)
        {
            String buffer = String.Empty;

            foreach (Double d in First)
            {
                buffer += String.Format("{0} ", d);
            }

            buffer.Substring(0, buffer.Length - 1);

            return buffer;
        }
    }
}
